using System;
using System.Collections.Generic;
using System.Text;

namespace CodePlex.OpenSearch
{
    internal class OpenSearchDescription
    {

        private string _shortName;
        private string _description;
        
        private string _contact;
        private string _developer;
        private string _attribution;
        private string _longName;

        private bool _adultContent;
        private SyndicationRight _syndicationRight;

        private string _searchFormUrl;
  

        private List<string> _tags = new List<string>();
        private List<Image> _images = new List<Image>();
        private List<Url> _urls = new List<Url>();
        private List<Query> _queries = new List<Query>();


      

        internal OpenSearchDescription()
        {

        }




        /// <summary>
        /// Contains a brief human-readable title that identifies this search engine.
        /// Restrictions: The value must contain 16 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element must appear exactly once. 
        /// </summary>
        internal string ShortName
        {
            get
            {
                return _shortName;
            }
            set
            {
                _shortName = value;
            }
        }


        /// <summary>
        /// Contains a human-readable text description of the search engine.
        /// Parent: OpenSearchDescription 
        /// Restrictions: The value must contain 1024 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element must appear exactly once. 
        /// </summary>
        internal string Description
        {
            get
            {
                return _description;
            }
            set
            {
                _description = value;
            }
        }

        /// <summary>
        /// Contains a set of words that are used as keywords to identify and categorize this search content. 
        /// Tags must be a single word and are delimited by the space character (' ').
        /// Parent: OpenSearchDescription 
        /// Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal List<string> Tags
        {
            get
            {
                return _tags;
            }
           
        }

        /// <summary>
        /// Contains an email address at which the maintainer of the description document can be reached.
        /// Parent: OpenSearchDescription 
        /// Restrictions: The value must conform to the requirements of Section 3.4.1 "Addr-spec specification" in RFC 2822. 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal string Contact
        {
            get
            {
                return _contact;
            }
            set
            {
                _contact = value;
            }
        }

        /// <summary>
        /// Contains the human-readable name or identifier of the creator or maintainer of the description document.
        /// The developer is the person or entity that created the description document, and may or may not be the owner, author, or copyright holder of the source of the content itself.
        /// Parent: OpenSearchDescription 
        /// Restrictions: The value must contain 64 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal string Developer
        {
            get
            {
                return _developer;
            }
            set
            {
                _developer = value;
            }
        }


        /// <summary>
        /// Contains a list of all sources or entities that should be credited for the content contained in the search feed.
        /// Parent: OpenSearchDescription 
        /// Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal string Attribution
        {
            get
            {
                return _attribution;
            }
            set
            {
                _attribution = value;
            }
        }



        /// <summary>
        /// Contains a boolean value that should be set to true if the search results may contain material intended only for adults.
        /// As there are no universally applicable guidelines as to what constitutes "adult" content, the search engine should make a good faith effort to indicate when there is a possibility that search results may contain material inappropriate for all audiences.
        /// Parent: OpenSearchDescription 
        /// Values:
        /// The values "false", "FALSE", "0", "no", and "NO" will be considered boolean FALSE; all other strings will be considered boolean TRUE. 
        /// Default: "false" 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal bool AdultContent
        {
            get
            {
                return _adultContent;
            }
            set
            {
                _adultContent = value;
            }
        }


        /// <summary>
        /// Contains a value that indicates the degree to which the search results provided by this search engine can be queried, displayed, and redistributed.
        /// Default: "open" 
        /// Requirements: This element may appear zero or one time.
        /// </summary>
        internal SyndicationRight SyndicationRight
        {
            get
            {
                return _syndicationRight;
            }
            set
            {
                _syndicationRight = value;
            }
        }


        /// <summary>
        /// Contains a URL that identifies the location of an image that can be used in association with this search content.
        /// Requirements: This element may appear zero, one, or more times.
        /// </summary>
        internal List<Image> Images
        {
            get
            {
                return _images;
            }
          
        }


        /// <summary>
        /// Describes an interface by which a search client can make search requests of the search engine.
        /// OpenSearch provides support for both index-based and page-based search engines. 
        /// By default, both the first search result and the first page of search results are numbered "1". 
        /// Search engines can use the "indexOffset" and "pageOffset" attributes to inform search clients of different starting values. 
        /// Requirements: This element must appear one or more times.
        /// </summary>
        internal List<Url> Urls
        {
            get
            {
                return _urls;
            }
          
        }



        /// <summary>
        /// Contains an extended human-readable title that identifies this search engine.
        /// Search clients should use the value of the ShortName element if this element is not available.
        /// Restrictions: The value must contain 48 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This element may appear zero or one time. 
        /// </summary>
        internal string LongName
        {
            get
            {
                return _longName;
            }
            set
            {
                _longName = value;
            }
        }




        /// <summary>
        /// Defines a search query that can be performed by search clients. Please see the OpenSearch Query element specification for more information.
        /// OpenSearch description documents should include at least one Query element of role="example" that is expected to return search results. Search clients may use this example query to validate that the search engine is working properly.
        /// Parent: OpenSearchDescription 
        /// Requirements: This element may appear zero or more times. 
        /// </summary>
        internal List<Query> Queries
        {
            get
            {
                return _queries;
            }
        }












        /// <summary>
        /// http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox
        /// The URL to go to to open up the search page at the site for which the plugin is designed to search. This provides a way for Firefox to let the user visit the web site directly.
        /// </summary>
        internal string SearchFormUrl
        {
            get
            {
                return _searchFormUrl;
            }
            set
            {
                _searchFormUrl = value;
            }
        }

     




    }
}
